package com.zhou.common.base.mq.mq;


import com.aliyun.openservices.ons.api.Producer;
import com.aliyun.openservices.ons.api.order.OrderProducer;
import org.apache.rocketmq.client.producer.DefaultMQProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MqCombineConfiguration {

    @Autowired(required = false)
    private OrderProducer orderProducer;

    @Autowired(required = false)
    private DefaultMQProducer defaultProducer;

    @Autowired(required = false)
    private Producer producer;

    @Bean
    public CombineProducer combineProducer() {
        return new CombineProducer(orderProducer, producer, defaultProducer);
    }

}
